The increasing complexity and length of computer programs makes their debugging an arduous process. A computer program may have literally billions of lines of code, any one of which may be responsible for causing an error in the program. When encountering such an error, the computer programmer may be forced to step through the program line by line in order to find the statement in the program causing the error. This manual process results in delays in developing computer programs in a timely fashion, and wastes resources that are better used in writing programs, not debugging them.
An example of an error that may be very difficult to precisely locate is the wild store. A wild store is an error which results when a write instruction of a computer program writes to a table in memory at an improper time or point in the computer program (for example, when the table is locked), or when the write instruction oversteps the boundaries of the table to which it intended to or is permitted to write, and instead writes to a different table in memory. The statement in a computer program causing a wild store is difficult to detect because, in the case where the statement is writing to a table in memory at an improper time, there may be millions of statements that must be manually examined to find the offending statement.
Furthermore, in the case where the statement is overstepping the boundaries of the table to which it is permitted to write, the difficulty in precisely detecting the statement is compounded by the nature of pointers that may be causing such errors. For example, in the C programming language, an array of integers may be defined as int x[50], which gives the array fifty elements 0 . . . 49, and a pointer may be defined as int *p. If at some point in the computer program p==x+50, not necessarily as a result of the statement p=x+50, but as a result of p being incremented in some fashion, p will no longer point within the array x, and the statement *p=5, for example, will result in the storing of the integer 5 outside of the range of the array x (since x+50==&x[50], while x is defined only through x[49]). Thus, in a program of billions of statements, tracking down the statement *p=5 as the statement causing a wild store error outside the boundaries of the array x is difficult and unintuitive.
In the context of supercomputers, proposed solutions for detecting such errors do not in actuality precisely detect the errors. For example, the Cray C90 and Cray T90 supercomputers, available from the Cray Research subsidiary of Silicon Graphics, Inc., headquartered in Eagan, Minn., include a hardware watchpoint mechanism that generates an interrupt when any address within a defined contiguous range of addresses within the memory has been accessed. However, the hardware watchpoint mechanism is itself limited in that it is able to only watch one contiguous range of memory for an entire program, while a given computer program typically defines thousands of tables spanning many different discontiguous ranges of memory. Furthermore, once the hardware watchpoint mechanism is enabled, it generates an interrupt when an address within its defined memory range is accessed regardless of whether the access is proper or improper. Thus, the mechanism cannot be simply enabled and expected to catch a wild store error.
There is a need, therefore, to solve these problems related to the precise detection of errors in computer programs, such as wild store errors. Such a solution should identify the precise statement in a computer program causing a wild store error both in the case where the statement is occurring at an improper time (i.e., the relevant table is locked), and in the case where the statement is overstepping the boundaries of the relevant table (i.e., as may result when using dynamic pointers). Furthermore, the solution should specifically be able to detect precisely an error regardless of the one of different discontiguous ranges of memory to which the error particularly relates, and thus should implicitly be able to distinguish between proper and improper accesses to these tables.